<?php
namespace app\admin\validate;
use think\Validate;

class Varieties extends Validate
{
    protected $rule = [
        'petname'  =>  'require',
        'v_name'  =>  'require',
        'v_title'  =>  'require',
        'v_content'  =>  'require',
        'v_img'  =>  'require',
    ];

    protected $message = [
        'petname.require'  =>  '必须填写宠物名',
        'v_name.require'  =>  '必须填写宠物英文名',
        'v_title.require'  =>  '必须填写简介',
        'v_content.require'  =>  '必须填写内容',
        'v_img.require'  =>  '必须上传图片',
    ];

    protected $scene = [
        'add'   =>  ['petname','v_name','v_title','v_content','v_img'],
    ];
}